package com.skyline.base.model;

import java.util.Date;

import com.skyline.common.cache.Cachable;
import com.skyline.common.util.CommonUtils;


/**
 * 评论的POJO
 * 
 * @author Jairus Chan
 * @version 0.1
 * */
public class Comment implements Cachable {
	private static final long serialVersionUID = -7445014822373204542L;
	private Long id;
	private Long commenterId;
	private String commenterNickname;
	private String commenterPortrait;
	private String content;
	private Date createTime;
	private Long ref;
	private Comment refComment;
	private Object resourceId;
	private Long ownerId;
	private int agreeNum;
	private int disagreeNum;

	public Comment() {
		refComment = null;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getCommenterId() {
		return commenterId;
	}

	public void setCommenterId(Long commenterId) {
		this.commenterId = commenterId;
	}

	public String getCommenterNickname() {
		return commenterNickname;
	}

	public void setCommenterNickname(String commenterNickname) {
		this.commenterNickname = commenterNickname;
	}

	public String getCommenterPortrait() {
		return commenterPortrait;
	}

	public void setCommenterPortrait(String commenterPortrait) {
		this.commenterPortrait = commenterPortrait;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getCreateTime() {
		return CommonUtils.cloneDate(createTime);
	}

	public void setCreateTime(Date createTime) {
		this.createTime = CommonUtils.cloneDate(createTime);
	}

	public Long getRef() {
		return ref;
	}

	public void setRef(Long ref) {
		this.ref = ref;
	}

	public Comment getRefComment() {
		return refComment;
	}

	public void setRefComment(Comment refComment) {
		this.refComment = refComment;
	}

	public Object getResourceId() {
		return resourceId;
	}

	public void setResourceId(Object resourceId) {
		this.resourceId = resourceId;
	}

	public Long getOwnerId() {
		return ownerId;
	}

	public void setOwnerId(Long ownerId) {
		this.ownerId = ownerId;
	}

	public int getAgreeNum() {
		return agreeNum;
	}

	public void setAgreeNum(int agreeNum) {
		this.agreeNum = agreeNum;
	}

	public int getDisagreeNum() {
		return disagreeNum;
	}

	public void setDisagreeNum(int disagreeNum) {
		this.disagreeNum = disagreeNum;
	}

	public String getFkId() {
		return this.resourceId.toString();
	}
}
